home *** CD-ROM | disk | FTP | other *** search
- Path: pn.itnet.it!not-for-mail
- From: "Stefano Agostinelli" <agos001@pn.itnet.it>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Shared Lib problems
- Date: Fri, 01 Mar 1996 14:27:16 +0100
- Organization: ITnet
- Message-ID: <65641307%agos001@pn.itnet.it>
- References: <65641284%agos001@pn.itnet.it> <DnJEs1.Lr0@unx.sas.com>
- NNTP-Posting-Host: agos001.pn.itnet.it
- X-NewsReader: IntuiNews 1.3 (27.8.95)
-
- Doug Walker wrote in comp.sys.amiga.programmer about "Re: Shared Lib problems":
- > stdio works IF your shared library was linked with libinitr.o. If you
- > linked with libinit.o instead of libinitr.o, stdio will not work. I
- > believe libinitr.o was added in the 6.50 version, so if you have an
- > earlier version, you won't be able to use stdio from a shared library.
-
- Yes I'm using SAS/C 6.5x and yes my library was linked with libinit.o
-
- > >slink with amiga.lib first of sc.lib,so I've done but the linker
- > >just reports a multiple definition error (on Boopsi functions btw),so
- > >what should I do in order to use amiga.lib stdio functions?
- >
- > Don't use the amiga.lib sprintf, use its Sprintf. There is a DOS function
- > Sprintf that does not conflict with the ANSI namespace that the compiler
- > uses. In my opinion, it was a horrible mistake for Commodore to put
- > non-ANSI functions in their library that have ANSI names, but that's water
- > under the bridge.
-
- Sprintf? There is or there should be?I see DOS has something called VFPrint
- and VPrintf (amiga.lib FPrintf and Printf) but no VSprintf (or Sprintf in
- amiga.lib).
- However yes you're right,those conflicts are quite confusing for beginner
- grade programmer (the category I belong to :).
- However amiga.lib sprintf is so tiny that it's rather useful: it's about
- 1K shorter than the full fledged SAS/C ANSI one.
-
- > I don't know what the deal is with your multiple definition error, I'd have
- > to see more information. Your exact link command line (whether with SC or
- > SLINK) would help, as would the error or warning message(s) that you are
- > getting.
-
- Command I use is:
- "slink ... lib:amiga.lib lib:sc.lib ..."
- or
- "sc ... link lib=small.lib ...".
-
- I get these errors from the linker. However please note that the library
- is correctly built and indeed sprintf works!
-
- ---CUT---
- Pass1 for Library 'lib:amiga.lib'
- Pass1 for Library 'LIB:sc.lib'
- ERROR: Multiply defined symbol '_DoMethod'.
- First defined in file 'lib:amiga.lib'.
- Type = RELOCATABLE Value = 0
- Redefined in file 'LIB:sc.lib'.
- Type = RELOCATABLE Value = 0
- ERROR: Multiply defined symbol '_DoSuperMethod'.
- First defined in file 'lib:amiga.lib'.
- Type = RELOCATABLE Value = 20
- Redefined in file 'LIB:sc.lib'.
- Type = RELOCATABLE Value = 20
- ERROR: Multiply defined symbol '_CoerceMethod'.
- First defined in file 'lib:amiga.lib'.
- Type = RELOCATABLE Value = 46
- Redefined in file 'LIB:sc.lib'.
- Type = RELOCATABLE Value = 46
- ERROR: Multiply defined symbol '_SetSuperAttrs'.
- First defined in file 'lib:amiga.lib'.
- Type = RELOCATABLE Value = 150
- Redefined in file 'LIB:sc.lib'.
- Type = RELOCATABLE Value = 170
- Pass1 for Library 'LIB:amiga.lib'
- ---CUT---
-
- Many thanks for your help!
-
- Regards
- Stefano
-
- +--------------------------+-------------------------------------------+
- | Stefano Agostinelli | Now developing for You ARM : |
- | Physics Dep. - Genoa | the state of art Amiga Role Master System |
- +--------------------------+-------------------------------------------+
- | IRC: arm | WWW: www.geocities.com/SiliconValley/3630 |
- | E-M: agos001@pn.itnet.it | Look at Stefano.html and ARM.html |
- +--------------------------+-------------------------------------------+
-
-